NotesPeek shows that the imported Rich Text does not have a normal structure, even after just one import. I do not know exactly why this happens, or why there is no error message until after many imports.
Editing and saving the document does fix the structure. The editor uses the Rich Text data in the note to create its own in-memory data structure for display. When you save the document, the editor exports its in-memory data as Rich Text again. So now the Rich Text has the structure that the editor imposed on it.
Perhaps your code creates DXL that is not quite right. I have not investigated it.
If I had to code this application, I think I would use a NotesDOMParser to add a new doclink element to the end of the history. The link has no border by default, there is no danger of writing incorrect DXL, and there is no need to store the list of links in a second ("profile") document.